package com.sptan.ssmp.converter;

import com.sptan.ssmp.domain.AdminUser;
import com.sptan.ssmp.dto.AdminUserDTO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 管理端用户表 Mapstruct转换接口.
 *
 * @author lp
 * @since 2024 -05-04
 */
@Mapper(componentModel = "spring")
public interface AdminUserConverter {

    /**
     * The constant INSTANCE.
     */
    AdminUserConverter INSTANCE = Mappers.getMapper(AdminUserConverter.class);


    /**
     * To dto base station dto.
     *
     * @param entity the entity
     * @return the base station dto
     */
    AdminUserDTO toDto(AdminUser entity);

    /**
     * dto to entity.
     *
     * @param dto the dto
     * @return the base station brief dto
     */
    AdminUser toEntity(AdminUserDTO dto);

    /**
     * To dto list.
     *
     * @param entities the entities
     * @return the list
     */
    List<AdminUserDTO> toDtoList(List<AdminUser> entities);

    /**
     * To entity list.
     *
     * @param dtos the dtos
     * @return the list
     */
    List<AdminUser> toEntities(List<AdminUserDTO> dtos);
}
